package day07;

import java.util.ArrayList;
import java.util.List;

public class Person {

    private String name;
    private int age;

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Person() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public static List<Person> list() {

        List<Person> list = new ArrayList<>();

        list.add(new Person("xx1", 121));
        list.add(new Person("xx222", 122));
        list.add(new Person("xx3", 123));
        list.add(new Person("xx444", 124));
        list.add(new Person("xx2222", 125));
        list.add(new Person("xx5", 125));

        return list;

    }

    @Override
    public String toString() {
        return "pocker.Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
